package com.liuh.okhttp.builder;

import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.RequestBody;

/**
 * @note post string builder
 * @author liuh
 * */
public class PostStringBuilder extends OkHttpRequestBuilder<PostStringBuilder> {

	private String content;
	private MediaType mediaType;

	public PostStringBuilder content(String content) {
		this.content = content;
		return this;
	}

	public PostStringBuilder mediaType(MediaType mediaType) {
		this.mediaType = mediaType;
		return this;
	}

	@Override
	public Request builderRequest() {
		// TODO Auto-generated method stub
		Request.Builder mBuilder = builderBaseRequest().post(
				RequestBody.create(mediaType, content));
		return mBuilder.build();
	}

}
